Add PACKAGEVERSION token expansion for manifest fields#6312
Conversation
- Expand <PACKAGEVERSION> in supported manifest fields for YAML and REST parsing - Add/adjust YAML and REST tests and test data coverage - Update release notes with explicit supported fields Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
JohnMcPMS
left a comment
There was a problem hiding this comment.
I'm not seeing the ROI on taking this change. What is the scenario other than "If I modify the manifest manually I can just change 1 location (instead of find/replace that one thing)."
You're correct that it is primarily ease of authorship. I've also seen scenarios where WingetBot creates updates but things like 'DisplayName` aren’t updated - leading to noise and inconsistiencies if it slips through Stephens automated review and not a manual review. Or similarly, if an exe puts the version as part of their product code manifest updates don’t always catch that - especially if not carefully reviewed Granted, authorship scenarios are certainly edge cases and the example above could (and probably should) be fixed in other ways. I also see future value in other fields like documentation URLs if those change per version - where tooling (including wingetcreate) doesn’t necessarily remove or update the field automatically. This was just an idea I had to making it easier for contributors, but understand if this isn’t something the team wants to take in |
📖 Description
This PR adds
<PACKAGEVERSION>token expansion for manifest data fields that can include versioned values.Implemented behavior:
<PACKAGEVERSION>at manifest parse time (YAML and REST), distinct from runtime installer argument token replacement like<LOGPATH>.Installers[*].NestedInstallerFiles[*].RelativeFilePathInstallers[*].ProductCodeInstallers[*].AppsAndFeaturesEntries[*].DisplayNameInstallers[*].AppsAndFeaturesEntries[*].ProductCodeInstallers[*].InstallationMetadata.DefaultInstallLocationInstallers[*].InstallationMetadata.Files[*].RelativeFilePathDefaultLocale.ReleaseNotesUrlLocalization[*].ReleaseNotesUrlPACKAGEVERSIONto the spelling allowlist.This PR was prepared with assistance from GitHub Copilot.
🔗 References
Resolves #4494
🔍 Validation
src/AppInstallerCLITests/YamlManifest.cppsrc/AppInstallerCLITests/RestInterface_1_4.cppsrc/AppInstallerCLITests/TestData/Manifest-Good-PackageVersionToken.yamlsrc/AppInstallerCLITests/AppInstallerCLITests.vcxproj✅ Checklist
📋 Issue Type